package bairui.international.console.web.controller.personnel.employee;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

import com.lianjing.sh.project.config.web.Project_Config_Web_PageTemplate;
import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.module.context.ModuleContext;
import com.lianjing.sh.spring.web.controller.enhance.navigations.context.NavigationContext;
import com.lianjing.sh.spring.web.controller.enhance.tab.TabContext;

import bairui.international.console.web.controller.personnel.C_Personnel_Index_Left;
import bairui.international.console.web.controller.personnel.Tab_Personnel;


/**
 * @generated
 *
 * C_Admin_Personnel_Employee_PageAccess
 *
 */
@Controller
public class C_Personnel_Employee_PageAccess
 extends SC_Personnel_Employee_PageAccess 
{
	
	/**
	 * 管理
	 */
	@Action(PageAccess.class)
	@GetMapping(PageAccess.RequestMappingValue)
	public ModelAndView access(
		ModelMap map, HttpServletRequest request, TabContext tabContext,
		NavigationContext navigationContext, ModuleContext moduleContext
	) throws Exception {
		/* 侧边栏 */
		C_Personnel_Index_Left.importPage(map);
		/* Tab */
		Tab_Personnel.tab(tabContext);
		
		
		/* 模块 */
		moduleContext
			.addModule(this.module_Page.module(
					new C_Personnel_Employee_Page.Page.Operate() {}, 
					new C_Personnel_Employee_AddAccess.AddAccess.Operate() {}, 
					new C_Personnel_Employee_ExcelExport.ExcelExport.Operate() {}, 
					new C_Personnel_Employee_DetailAccess.DetailAccess.Operate() {
						@Override public Object getEmployeeId() {
							return "{{:id}}";
						}
					}, 
					new C_Personnel_Employee_EditAccess.EditAccess.Operate() {
						@Override public Object getEmployeeId() {
							return "{{:id}}";
						}
					}, 
					new C_Personnel_Employee_Delete.Delete.Operate() {
						@Override public Object getEmployeeId() {
							return "{{:id}}";
						}
					},
					new C_Personnel_Employee_InitPassword_Get.Get.Operate(){
						@Override public Object getEmployeeId() {
							return "{{:id}}";
						}	
					}
				));
		/* 路径 */
		return Project_Config_Web_PageTemplate.Admin_Common(request);
	}

}


